package com.tonann.app.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tonann.common.annotation.Excel;
import com.tonann.common.core.domain.BaseEntity;
import com.tonann.common.core.domain.entity.SysDictData;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.annotation.Id;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 传感器管理对象 app_sensor
 *
 * @author tonann
 * @date 2022-10-17
 */
@Data
public class AppSensorData implements Serializable
{
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Id
    private Long sensorId;

    /**
     * 所属设备
     */
//    @Excel(name = "所属设备")
    private Long deviceId;

    @Excel(name = "设备名称")
    private String deviceName;

    private String gatewayName;

    private String gatewayType;

    /**
     * MQTT的订阅主题
     */
    @Excel(name = "MQTT的订阅主题")
    private String mqttTopic;

    /**
     * MQTT的通道号
     */
    @Excel(name = "MQTT的通道号")
    private String mqttDeviceChannel;

    /**
     * MQTT的设备名称
     */
    @Excel(name = "MQTT的设备名称")
    private String mqttDeviceName;

    /**
     * MQTT的标记
     */
    @Excel(name = "MQTT的标记")
    private String mqttDeviceTag;

    /**
     * MQTT写入主题
     */
    @Excel(name = "MQTT写入主题")
    private String mqttWriteTopic;

    @Excel(name = "告警规则")
    private String ruleName;

    @Excel(name = "告警下限")
    private String alarmBottom;

    @Excel(name = "告警上限")
    private String alarmTop;
    /**
     * 传感器编号
     */
    @Excel(name = "传感器编号")
    private String sensorCode;
    /**
     * 传感器名字
     */
    @Excel(name = "传感器名字")
    private String sensorName;

    /** 传感器类型 */
    @Excel(name = "传感器类型", dictType =  "app_sensor_type")
    private String sensorType;

    /** 传感器取值地址 */
    @Excel(name = "PLC取值地址")
    private String outputAddress;

    /** 传感器设值地址 */
    @Excel(name = "PLC设值地址")
    private String inputAddress;

    /** 传感器值 */
//    @Excel(name = "传感器值")
    private String value;

    private List<AppSensorMultiValued> sensorMultiValuedList;

    private List<SysDictData> sensorTypeDictList;

    private String valueDesc;

    private String typeDesc;

    /** 计量单位 */
    @Excel(name = "计量单位",dictType = "app_sensor_unit")
    private String unit;

    @Excel(name = "面板显示")
    private String isDisplay;

    @Excel(name = "专门用途")
    private String specialPurpose;

    @Excel(name = "部门名称")
    private String deptName;

    @Excel(name = "位置名称")
    private String placeName;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 取值周期 */
//    @Excel(name = "取值周期")
    private Long intervalTime;

    /** 值放大倍数 */
//    @Excel(name = "放大倍数")
    private Long magnification;
    /** 三维编号 */
//    @Excel(name = "三维编号")/
    private String tdCode;
}
